home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / listx / owndraw.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-11-17  |  8.4 KB  |  246 lines

  1. VERSION 4.00
  2. Begin VB.Form frmOwnDraw 
  3.    BorderStyle     =   0  'None
  4.    ClientHeight    =   5835
  5.    ClientLeft      =   2910
  6.    ClientTop       =   3555
  7.    ClientWidth     =   7830
  8.    ControlBox      =   0   'False
  9.    Height          =   6240
  10.    Left            =   2850
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MDIChild        =   -1  'True
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   5835
  16.    ScaleWidth      =   7830
  17.    ShowInTaskbar   =   0   'False
  18.    Top             =   3210
  19.    Width           =   7950
  20.    Begin VB.PictureBox Picture4 
  21.       AutoSize        =   -1  'True
  22.       Height          =   405
  23.       Left            =   7290
  24.       Picture         =   "Owndraw.frx":0000
  25.       ScaleHeight     =   345
  26.       ScaleWidth      =   330
  27.       TabIndex        =   5
  28.       Top             =   5100
  29.       Visible         =   0   'False
  30.       Width           =   390
  31.    End
  32.    Begin VB.PictureBox Picture3 
  33.       AutoSize        =   -1  'True
  34.       Height          =   405
  35.       Left            =   7260
  36.       Picture         =   "Owndraw.frx":065E
  37.       ScaleHeight     =   23
  38.       ScaleMode       =   3  'Pixel
  39.       ScaleWidth      =   20
  40.       TabIndex        =   4
  41.       Top             =   4485
  42.       Visible         =   0   'False
  43.       Width           =   360
  44.    End
  45.    Begin VB.PictureBox Picture2 
  46.       AutoRedraw      =   -1  'True
  47.       AutoSize        =   -1  'True
  48.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  49.          Name            =   "Arial"
  50.          Size            =   12
  51.          Charset         =   0
  52.          Weight          =   700
  53.          Underline       =   0   'False
  54.          Italic          =   0   'False
  55.          Strikethrough   =   0   'False
  56.       EndProperty
  57.       Height          =   420
  58.       Left            =   7245
  59.       Picture         =   "Owndraw.frx":0C04
  60.       ScaleHeight     =   360
  61.       ScaleWidth      =   360
  62.       TabIndex        =   3
  63.       Top             =   3870
  64.       Visible         =   0   'False
  65.       Width           =   420
  66.    End
  67.    Begin VB.PictureBox Picture1 
  68.       AutoRedraw      =   -1  'True
  69.       AutoSize        =   -1  'True
  70.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  71.          Name            =   "MS Sans Serif"
  72.          Size            =   13.5
  73.          Charset         =   0
  74.          Weight          =   400
  75.          Underline       =   0   'False
  76.          Italic          =   0   'False
  77.          Strikethrough   =   0   'False
  78.       EndProperty
  79.       Height          =   540
  80.       Left            =   3615
  81.       Picture         =   "Owndraw.frx":0DA6
  82.       ScaleHeight     =   480
  83.       ScaleWidth      =   480
  84.       TabIndex        =   1
  85.       Top             =   360
  86.       Width           =   540
  87.    End
  88.    Begin VB.Label Label3 
  89.       Alignment       =   2  'Center
  90.       Caption         =   "Software"
  91.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  92.          Name            =   "MS Sans Serif"
  93.          Size            =   24
  94.          Charset         =   0
  95.          Weight          =   400
  96.          Underline       =   0   'False
  97.          Italic          =   0   'False
  98.          Strikethrough   =   0   'False
  99.       EndProperty
  100.       Height          =   540
  101.       Index           =   1
  102.       Left            =   4335
  103.       TabIndex        =   8
  104.       Top             =   1845
  105.       Width           =   3105
  106.    End
  107.    Begin VB.Label Label3 
  108.       Alignment       =   2  'Center
  109.       Caption         =   "Mabry"
  110.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  111.          Name            =   "MS Sans Serif"
  112.          Size            =   24
  113.          Charset         =   0
  114.          Weight          =   400
  115.          Underline       =   0   'False
  116.          Italic          =   0   'False
  117.          Strikethrough   =   0   'False
  118.       EndProperty
  119.       Height          =   540
  120.       Index           =   0
  121.       Left            =   4335
  122.       TabIndex        =   7
  123.       Top             =   1245
  124.       Width           =   3105
  125.    End
  126.    Begin VB.Label Label2 
  127.       Caption         =   $"Owndraw.frx":1028
  128.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  129.          Name            =   "MS Sans Serif"
  130.          Size            =   9.75
  131.          Charset         =   0
  132.          Weight          =   400
  133.          Underline       =   0   'False
  134.          Italic          =   0   'False
  135.          Strikethrough   =   0   'False
  136.       EndProperty
  137.       Height          =   1005
  138.       Left            =   360
  139.       TabIndex        =   6
  140.       Top             =   4335
  141.       Width           =   6600
  142.       WordWrap        =   -1  'True
  143.    End
  144.    Begin VB.Label Label1 
  145.       Caption         =   "COMpletely out of control!"
  146.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  147.          Name            =   "MS Sans Serif"
  148.          Size            =   13.5
  149.          Charset         =   0
  150.          Weight          =   400
  151.          Underline       =   0   'False
  152.          Italic          =   0   'False
  153.          Strikethrough   =   0   'False
  154.       EndProperty
  155.       Height          =   465
  156.       Left            =   4245
  157.       TabIndex        =   2
  158.       Top             =   390
  159.       Width           =   3465
  160.    End
  161.    Begin MabryCtl.MList MList1 
  162.       Height          =   3705
  163.       Left            =   360
  164.       TabIndex        =   0
  165.       Top             =   360
  166.       Width           =   3000
  167.       _ExtentX        =   5292
  168.       _ExtentY        =   6535
  169.       BackColor       =   16777215
  170.       Caption         =   "Caption"
  171.       CaptionAlignment=   2
  172.       Object.TabStop         =   -1  'True
  173.       ThreedShadowColor=   -2147483627
  174.       MousePointer    =   -842150451
  175.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  176.          Name            =   "MS Sans Serif"
  177.          Size            =   8.25
  178.          Charset         =   0
  179.          Weight          =   400
  180.          Underline       =   0   'False
  181.          Italic          =   0   'False
  182.          Strikethrough   =   0   'False
  183.       EndProperty
  184.       BeginProperty Columns {23BAA6DE-05A6-11D1-9E15-0020AFD6A9D5} 
  185.          ColumnCount     =   3
  186.          BeginProperty Column0 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5} 
  187.             Object.Width           =   32
  188.             MinWidth        =   0
  189.             MaxWidth        =   -1
  190.             UserResizeEnabled=   -1
  191.             Heading         =   "Col 1"
  192.             Object.Visible         =   -1
  193.             ColumnAlignment =   2
  194.             HeadingAlignment=   2
  195.          EndProperty
  196.          BeginProperty Column1 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5} 
  197.             Object.Width           =   110
  198.             MinWidth        =   0
  199.             MaxWidth        =   -1
  200.             UserResizeEnabled=   -1
  201.             Heading         =   "Col 2"
  202.             Object.Visible         =   -1
  203.             ColumnAlignment =   0
  204.             HeadingAlignment=   0
  205.          EndProperty
  206.          BeginProperty Column2 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5} 
  207.             Object.Width           =   0
  208.             MinWidth        =   0
  209.             MaxWidth        =   -1
  210.             UserResizeEnabled=   -1
  211.             Heading         =   "Col 3"
  212.             Object.Visible         =   -1
  213.             ColumnAlignment =   0
  214.             HeadingAlignment=   0
  215.          EndProperty
  216.       EndProperty
  217.    End
  218. Attribute VB_Name = "frmOwnDraw"
  219. Attribute VB_Creatable = False
  220. Attribute VB_Exposed = False
  221. Option Explicit
  222. Private Sub Form_Load()
  223.    Dim i As Integer
  224.    Dim c As New CDraw
  225.    ' Get some bitmaps over to the CDraw class so they
  226.    ' can be used when drawing the list
  227.    Set c.m_Picture1 = Picture1
  228.    Set c.m_Picture2 = Picture2
  229.    Set c.m_Picture3 = Picture3
  230.    Set c.m_Picture4 = Picture4
  231.    ' Assign the CDraw object to each column
  232.    MList1.Columns(0).PaintObject = c
  233.    MList1.Columns(1).PaintObject = c
  234.    MList1.Columns(2).PaintObject = c
  235.    ' We're going to draw the caption too!
  236.    MList1.CaptionPaintObject = c
  237.    ' The list must be populated with something.  Since
  238.    ' all the rows are ownerdrawn by CDraw anyway the contents
  239.    ' of the list are irrelevant. But if the list was empty
  240.    ' the control wouldn't know that anything needed to be
  241.    ' drawn.
  242.    For i = 1 To 25
  243.       MList1.AddItem i
  244.    Next
  245. End Sub
  246.